﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Master/MasterPage.master" AutoEventWireup="true"
    CodeBehind="MEDIUM_HD.aspx.cs" Inherits="DomMgmtSystem.View.MEDIUM_HD" EnableEventValidation="false" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Content" runat="server">
    <table class="table table-bordered table-hover" id="info">
        <thead>
            <tr>
                <td colspan="2" class="tableTitle">
                    <strong>&nbsp;
                        <asp:Label ID="lbTitle" runat="server" Text=""></asp:Label></strong>
                </td>
            </tr>
        </thead>
        <tbody>
            <tr name="rowNewHD">
                <td class="tableleft">
                    使用状态 ：
                </td>
                <td>
                    <asp:DropDownList ID="ddlMEDIUM_SYZT" runat="server" Width="200px">
                        <asp:ListItem Value="1">已使用</asp:ListItem>
                        <asp:ListItem Value="0">未使用</asp:ListItem>
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td class="tableleft">
                    摄区代号：
                </td>
                <td>
                    <asp:TextBox ID="txtMEDIUM_SQDH" runat="server" Width="200px" onblur="javascript:getBaseInfo();"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="tableleft">
                    介质编号 ：
                </td>
                <td>
                    <asp:DropDownList ID="ddlMEDIUM_JZBH" runat="server" Width="200px" AutoPostBack="false"
                        OnSelectedIndexChanged="ddlMEDIUM_JZBH_SelectedIndexChanged">
                    </asp:DropDownList>
                </td>
            </tr>
            <tr name="rowNewHD">
                <td class="tableleft">
                    硬盘原编号SN ：
                </td>
                <td>
                    <asp:TextBox ID="txtMEDIUM_SN" runat="server" Width="200px"></asp:TextBox>
                </td>
            </tr>
            <tr name="rowNewHD">
                <td class="tableleft">
                    用途 ：
                </td>
                <td>
                    <asp:DropDownList ID="ddlMEDIUM_YT" runat="server" Width="200px">
                        <asp:ListItem Value="1">用于接收</asp:ListItem>
                        <asp:ListItem Value="2">用于提供</asp:ListItem>
                        <asp:ListItem Value="3">用于备份</asp:ListItem>
                    </asp:DropDownList>
                </td>
            </tr>
            <tr name="rowNewHD">
                <td class="tableleft">
                    来源 ：
                </td>
                <td>
                    <asp:TextBox ID="txtMEDIUM_LY" runat="server" Width="200px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="tableleft">
                    资料名称 ：
                </td>
                <td>
                    <asp:TextBox ID="txtMEDIUM_ZLMC" runat="server" Width="200px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="tableleft">
                    数据类型 ：
                </td>
                <td>
                    <asp:DropDownList ID="ddlMEDIUM_ZLLX" runat="server" Width="200px">
                        <asp:ListItem Value="CHD">DOM正射影像五万生产</asp:ListItem>
                        <asp:ListItem Value="CDJ">DOM正射影像五万收集</asp:ListItem>
                        <asp:ListItem Value="CSM">DOM正射影像扫描数据</asp:ListItem>
                        <asp:ListItem Value="CTD">DOM正射影像土地覆盖数据</asp:ListItem>
                        <asp:ListItem Value="CGW">长城测量</asp:ListItem>
                        <asp:ListItem Value="CD2">原始卫星影像</asp:ListItem>
                        <asp:ListItem Value="CDOM">成果数据</asp:ListItem>
                        <asp:ListItem Value="CLSHP">历史航片数据</asp:ListItem>
                        <asp:ListItem Value="CYD">移动通讯数据</asp:ListItem>
                        <asp:ListItem Value="CRS">对外提供数据</asp:ListItem>
                        <asp:ListItem Value="CQT">其它数据</asp:ListItem>
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td class="tableleft">
                    提供单位 ：
                </td>
                <td>
                    <asp:TextBox ID="txtMEDIUM_YHTGDW" runat="server" Width="200px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="tableleft">
                    使用单位 ：
                </td>
                <td>
                    <asp:TextBox ID="txtMEDIUM_SYDW" runat="server" Width="200px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="tableleft">
                    登记序号 ：
                </td>
                <td>
                    <asp:TextBox ID="txtMEDIUM_DJXH" runat="server" Width="200px" fieldtype="int"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="tableleft">
                    提供日期 ：
                </td>
                <td>
                    <div id="datetimepicker1" name="datetimepicker" class="input-append date">
                        <asp:TextBox ID="txtMEDIUM_YHTGRQ" runat="server" Width="172px" fieldtype="nvarchar"></asp:TextBox><span
                            class="add-on"><i data-time-icon="icon-time" data-date-icon="icon-calendar"></i>
                        </span>
                    </div>
                </td>
            </tr>
            <tr>
                <td class="tableleft">
                    备份日期 ：
                </td>
                <td>
                    <div id="Div1" name="datetimepicker" class="input-append date">
                        <asp:TextBox ID="txtMEDIUM_USERQ" runat="server" Width="172px" fieldtype="nvarchar"></asp:TextBox><span
                            class="add-on"><i data-time-icon="icon-time" data-date-icon="icon-calendar"></i>
                        </span>
                    </div>
                </td>
            </tr>
            <%--<tr name="rowNewHD">
                        <td class="tableleft">
                            流水号 ：
                        </td>
                        <td >
                            <asp:TextBox ID="txtMEDIUM_LSH" runat="server" Width="200px"></asp:TextBox>
                        </td>
                    </tr>--%>
            <tr>
                <td class="tableleft">
                    硬盘类型 ：
                </td>
                <td>
                    <asp:DropDownList ID="ddlMEDIUM_LX" runat="server" Width="200px">
                        <asp:ListItem Value="0">航摄硬盘</asp:ListItem>
                        <asp:ListItem Value="1">DOM正摄影像硬盘</asp:ListItem>
                    </asp:DropDownList>
                </td>
            </tr>
            <tr name="rowNewHD">
                <td class="tableleft">
                    打印状态 ：
                </td>
                <td>
                    <asp:DropDownList ID="ddlMEDIUM_DYZT" runat="server" Width="200px">
                        <asp:ListItem Value="0">未打印</asp:ListItem>
                        <asp:ListItem Value="1">已打印</asp:ListItem>
                    </asp:DropDownList>
                </td>
            </tr>
        </tbody>
    </table>
    <div class="divcenter">
        <asp:HiddenField ID="hidJZBH" runat="server" />
        <asp:Button ID="btnSave" runat="server" Text="保 存" UseSubmitBehavior="false" OnClick="btnSave_Click"
            class="btn btn-primary" OnClientClick="javascript:if(CheckPage()==false) return false;return saveClick();">
        </asp:Button>
        &nbsp;&nbsp;
        <asp:Button ID="btnBack" runat="server" Text="返 回" ishow="true" OnClick="btnBack_Click"
            class="btn btn-success" Visible="False" />
    </div>
    <script language="javascript" type="text/javascript">
        function getBaseInfo() {
            if ($("#Content_txtMEDIUM_SQDH").val() != "") {
                url = "GetBaseInfo.ashx?type=3&CSQDH=" + $("#Content_txtMEDIUM_SQDH").val();
                $.get(url, function (data) {
                    $("#Content_ddlMEDIUM_JZBH").empty();
                    $("#Content_hidJZBH").val("");
                    for (var i = 0; i < data.length; i++) {
                        var op = "<option value='" + data[i].JZBH + "'>" + data[i].JZBH + "</option>"
                        $("#Content_ddlMEDIUM_JZBH").append(op);
                        $("#Content_hidJZBH").val(data[0].JZBH);
                    }
                });
            }
        }

        function setRow() {  //新盘隐藏一些字段
            $("#info tr").each(function () {
                if ($(this).attr("name") != "rowNewHD") {
                    if ($("#Content_ddlMEDIUM_SYZT").val() == "0")
                        $(this).hide();
                    else
                        $(this).show();
                }
            });
        }
        $(function () {
            $("#Content_ddlMEDIUM_SYZT").bind("change", function () {
                setRow();
            });
            $("#Content_ddlMEDIUM_JZBH").bind("change", function () {
                $("#Content_hidJZBH").val($("#Content_ddlMEDIUM_JZBH").val());
            });

        });

        function saveClick() {
            if ($("#Content_hidJZBH").val() == "") {
                alert("介质编号不能为空，请输入摄区代号查询介质编号！");
                return false;
            }
            return true;
        }

        if ($("#Content_lbTitle").val() != "新增信息") {
            setRow();
        }

    </script>
</asp:Content>
